package com.snail.readyvr.rest;

import com.snail.readyvr.mvp.model.BaseModel;
import com.snail.readyvr.mvp.model.GetTokenResponse;
import com.snail.readyvr.mvp.model.ReportParam;
import com.snail.readyvr.mvp.model.ReportResponse;

import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by MRKING on 2016/4/25.
 * 网络请求简单封装
 * 使用retrofit + rxjava + okhttp
 */
public interface RestClient {

    /**
     * 上报数据
     * @param reportParam
     * @return
     */
    @POST("system/report")
    Observable<BaseModel<ReportResponse>> report(@Body ReportParam reportParam);

    /**
     * 获取token
     * @param uuid
     * @return
     */
    @GET("system/token")
    Observable<BaseModel<GetTokenResponse>> getToken(@Query("uuid") String uuid);
}
